Closed
Bug 507553
Opened 16 years ago
Closed 14 years ago
Folders get messed up when reorganizing them (Gmail IMAP. Maximum Gmail Label length=40 bytes)
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: CheechGe, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [closeme 2011-07-07])
Attachments
(1 file)
43.01 KB,
application/pdf
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12 GTB5
Build Identifier: 2.0.0.22
Thunderbird connected to Gmail via IMAP.
In attempting to create 3rd level folders by moving (Drag and Drop) 2nd level folders (all of which had either emails, sub-folders, or both)under one or more new 2nd level folder Thunderbird completely messed up the folder structure and "lost" emails. Initially it appeared to have worked correctly as the new structure was in place. However, when I tried to D&D emails from my in-box to some of these relocated sub-folders the email would not be moved. I seem to recall getting a message that the folder structure didn't exist under Gmail.
Having had some folder problems like this previously I shut down and restarted TB again. When TB started up all the lowest level folders were missing as were the emails. Some of the folders were grayed out and italicized all of which previously had either sub-folders with emails only in the lowest sub-folder or emails in both level of folders. One of the folders exists in 2 places, one at level 2 which was the original locations and is grayed out,is italicize, and is empty. The other is at level 3 which is the new location but does not contained either the emails or the sub-folders that were there before the D&D operation.
This is a complete mess as it appears that almost all of the emails that were at the lower level folders are missing. However, it also appears that the structure in gmail reflects the original structure (with emails in place) and not the ones that should have been newly created during the D&D operation.
How do I get everything back in sync?
Reproducible: Didn't try
Steps to Reproduce:
0. No special setup was done
1. Create several about level 2 folders (right click>>>Create sub-folder)
2. D&D existing level2 folders (I did about 10 of these) that have emails and several (3-4) sub-folders under them with emails (in some cases there may have been as many as 75 or more emails under each subfolder) under both levels).
3. D&D emails from in-box to various sub-folders that exist at level 3 and below
4. At some point if you can not copy emails stop trying and restart TB
5. After the restart the folder structure was messed up.
Actual Results:
see details
Expected Results:
Desired folder structure.
I have a screen shot of the problem folder structure that shows the problem more clearly than the explanation. Please let me know if it's needed and where to send it.
Summary: Folders get messed up and reorganizing them → Folders get messed up when reorganizing them
Comment 2•16 years ago
|
||
(In reply to comment #0)
> Thunderbird connected to Gmail via IMAP.
> However, when I tried to D&D emails from my in-box to some of these relocated sub-folders the email would not be moved.
(A) For it looks that mail was not copied/moved.
First, read meta Bug 402793 Comment #1 and read at least documents pointed in Bug 402793 Comment #1, and read thru meta Bug 402793, and see bugs in Dependency Tree for Bug 402793.
Second, read meta Bug 450227, and see bugs in Dependency Tree for Bug 450227.
(B) For Drag&Drop of mail folders within a Gmail IMAP account.
"Move of folders in a IMAP account" is basically done via "rename" command of IMAP. Because "Gmail IMAP folder for IMAP client" is "Gmail Label", sequence of "rename" and/or "subscribe/unsubscribe" may affect Gmail's behaviour, when Gmail Label of AAA/BBB only is defined for Gmail IMAP folder of AAA/BBB(Gmail Lable of AAA doesn't exist).
Get IMAP log for "move of mail folder and its subfolders within a Gmail IMAP account via Drag&Drop", and chek IMAP level flow first.
> Getting log: https://wiki.mozilla.org/MailNews:Logging
> IMAP command and response : http://tools.ietf.org/html/rfc3501
If Tb's fault is seen in log, attach log file to this bug(never paste.)
Blocks: tb-gmailWIP
Comment 3•16 years ago
|
||
(B) For Drag&Drop of mail folders within a Gmail IMAP account.
Do you enable "Show only subscribed folders"? (Server Setting/Advanced button).
If yes, does same phenomenon occur with "Show only subscribed folders"=Disabled?
Summary: Folders get messed up when reorganizing them → Folders get messed up when reorganizing them (Gmail IMAP)
I don't have the time at this moment to look at everything in the response by WADA, however I thought I'd pass on a little more information. Please pardon me if what is stated above would correct the problem.
Upon more looking after my original post the problem appears to be worse than I expected. There is nothing showing in my in-box but there is a count of unread emails next to the folder.
Also, I have 2 gmail accounts managed by TB. The other one I don't use that frequently and did nothing to it during the problem incident. That one too does not have any emails in the inbox and there were about 60 in it before the problem occurred. I didn't look at the gmail account for this ID but I suppose it is OK.
I haven't changed any folder settings or display settings at all and everything was fine until I started reorganizing the folders mentioned above. I'll follow though on the diagnostic steps mentioned in the response but if possible with the information provided I would like if someone would tell me how to recover from this problem.
Thank you for your assistance.
Comment 5•16 years ago
|
||
One possible problem is that the total path length in a Gmail account is limited to 40 characters. Attempting to create a longer path will fail. An IMAP protocol log, as suggested above may show whether Thunderbird is correctly handling the NO responses.
Note: If you set the IMAP server directory, the visible path length is reduced correspondingly.
The easiest way to recover is probably to rename the labels through the Gmail web interface.
As far as seeing the messages in Thunderbird, make sure it is set to display all messages. (View->Messages->All), and that the search box is clear.
Brian:
I don't have any folders that are longer than 40, except that if the count of unread emails were to be included in that count would then be greater than 40. In the folders where the length is 38 and 39 there are no unread counts along side of the folder names and I sure there are unread emails in those folders. However, I have folders that were in existence that are also 39 characters long and although there are no unread mail counts in them now I sure there were in the past.
I don't know where the IMAP server directory would be set so I can't check that (I already looked in the account setting and didn't see anything that resembled a server directory name), but if there was one because some of the folders that were in existence before this problem started would have cause the same problem but long before this as the length of some of them is 39 characters.
The other thing that none of the above would explain is that my secondary email address which I didn't touch is all messed up too.
Concerning setting View>>Messages to All I do not have a "Messages" under the View menu item. The only "All" setting I can find is under Folders and that was already set to "All".
WADA:
The "Show only subscribed folders" was enabled. I disabled it but that didn't help either.
As I write this I just realized that the message window wasn't there, for some reason it was jammed against the right edge and barely visible. Once I put it back to normal the emails in my in-box became visible. However, there are no emails in my subfolders, but they appear to be in my "All Mail" folders along with 4000 or so emails, mostly spam or legitimate emails that I deleted months ago. The emails in gmail are in the correct folders (have the correct labels) so I still don't understand why they are not getting downloaded and put in the correct folders in TB. At this time I don't think the character limitation is the problem as the folders on gmail appear to be correct.
Right now I'm cleaning up the junk in All Folders manually. I'll get the log file and send it off as soon as I'm finished. Other than finding out what caused the problem the only think I need some help with is getting the emails in the correct folders without having to do it manually if possible and cleaning up the old folder structure that still remains.
Comment 7•16 years ago
|
||
(In reply to comment #6)
> I don't have any folders that are longer than 40, (snip)
Gmail's limitation of 40 chars is for length of Gmail Label. i.e. Total path length of a Gmail IMAP mail folder.
(a) IMAP folder of C under B under A == Gmail Label of "A/B/C".
(b) Move of Gmail IMAP folder(A/B/C) under folder(X/Y/Z)
== rename of IMAP folder named A/B/C to IMAP folder named X/Y/Z/C
+ unsubscribe of A/B/C + subscribe of X/Y/Z/C
== Rename Gmail Label of "A/B/C" to Gmail Label of "X/Y/Z/A/B/C"
(c) Move of Gmail IMAP folder(A, ncluding all subfolders) under folder(X/Y/Z)
== rename of IMAP folder named A to IMAP folder named X/Y/Z/A
+ unsubscribe of A, A/B, A/B/C
+ subscribe of X/Y/Z/A, X/Y/Z/A/B, X/Y/Z/A/B/C
== I think Gmail renames Gmail Label of "A", "A/B", "A/B/C"
to Gmail Label of "X/Y/Z/A", "X/Y/Z/A/B", "X/Y/Z/A/B/C" at same time.
Second length limitation is path length of Tb's file.
If length of C:\...\X.sbd/Y.sbd/Z.sbd/A.sbd/B.sbd/C.msf exceeds OS's path length limit, mail folder is not accessble, even if length of Gmail Label doesn't exceed length limit.
Tb has third length limit of local folder name lngth, but, AFAIR, it's around 128 characters(or bytes). I don't know it's applicable to IMAP or not. In any case, this third limitation is irrelevant to you case.
> The "Show only subscribed folders" was enabled. I disabled it but that didn't help either.
I don't know Gmail's behaviour in next case.
X/Y/Z/A/B <= 40 char, X/Y/Z/A/B/C > 40chars
I guess X/Y/Z/A & X/Y/Z/A/B are created(moved) normally and A/B/C remains.
"Show only subscribed folders"=Enabled may cause other funny phenomena in such cases. If "Show only subscribed folders"=Disabled, remained A/B/C will be displayed at least after restart of Tb, because Gmail IMAP does do nothing for unsubscibe(all folders are always placed in subscription list, unless advanced feature of Gmail is used.)
Keep "Show only subscribed folders" Disabled.
Anyway, get IMAP log for your Drag&Drop of mail folder, please.
Comment 8•16 years ago
|
||
(In reply to comment #7)
> (In reply to comment #6)
> I don't know Gmail's behaviour in next case.
> X/Y/Z/A/B <= 40 char, X/Y/Z/A/B/C > 40chars
Gmail returns a NO response if the target of the rename is greater than 40 characters.
So, if the account has labels:
A
A/B/C
A/B/C/D
X/Y
They will be normal folders, and A/B will be \Noselect
Assume X/Y/A/B/C is < 40, but X/Y/A/B/C/D is > 40 and you attempt to move A under X/Y
Then the initial renames will work, but the last will fail, leaving
A/B/C/D
X/Y
X/Y/A
X/Y/A/B/C
These will all be normal folders and all of these will be \Noselect folders:
A
A/B
A/B/C
X/Y/A/B
> .. Gmail IMAP does do nothing for
> unsubscibe(all folders are always placed in subscription list, unless advanced
> feature of Gmail is used.)
That is a myth. Gmail fully supports folder subscriptions on the server, even without the advanced IMAP Controls. (AIC hides the folders completely from IMAP, it does not unsubscribe.)
Comment 9•16 years ago
|
||
(In reply to comment #8)
> That is a myth. Gmail fully supports folder subscriptions on the server, even
> without the advanced IMAP Controls.
You are right. Gmail IMAP returned proper status for LIST(checked with Tb2 again). I probably mistook "IMAP log with Show only subscribed folders=Off" for "IMAP log with Show only subscribed folders=On, with some folders unsubscribed".
Reporter | ||
Comment 10•16 years ago
|
||
WADA, et al.
I did some further checking and I do have folders that exceed the 40 character length limitation. It appears that for the folders that were reorganized and are less than 40 characters that there are emails that are labeled correctly in gmail however, for these labels the subfolders do not exist in TB and there are no emails in the next higher level folder. Also, I attempted to delete the original folders (the ones that are now italicized and greyed out, (see the original attached screen shot)) but I can not do that either leaving me with part of the old structure and part of the new structur but no emails in either.
There is no option to rename the labels under Gmail so if there are other suggestions on how to go about repairing my folders I appreciate some direction as I'd hate to make things worse then they are now by going about it incorrectly. I suppose I could just delete the labels and start over again but would that clear up the folders on TB?
One more thing that happened as a result of this problem. For whatever reason, about a 2 years worth of deleted emails (mostly Spam but some were legit) numbering about 10000 reappeared in Gmails "All folders" and were promptly downloaded to TB's All Folders (up to the limit size). There is a way to cause Gmail to remove deleted emails and not archive them. The gmail settings to do so follows:
For IMAP delete to Trash,
1. Go to Gmail webmail Settings.
2. In Labs tab, turn on Advanced IMAP controls.
3. In Forwarding and POP/IMAP settings set Auto-Expunge it is set to "Do not automatically expunge messages"
4. In the setting When the message is expunged ..., pick either Move the message to Trash or Immediately delete the message forever.
5. In Labels tab, hide the All Mail folder.
In reference to getting the log file. From what I can see the log file is turned off and has to be enabled. That would mean that I need to recreate the problem again. Am I correct in my understanding?
Comment 11•16 years ago
|
||
(In reply to comment #10)
> There is no option to rename the labels under Gmail
Go to Settings, then Labels, in Gmail on the web. Clicking on any user label allows you to edit it.
Comment 12•16 years ago
|
||
(In reply to comment #10)
> One more thing that happened as a result of this problem. For whatever reason,
> about a 2 years worth of deleted emails (mostly Spam but some were legit)
> numbering about 10000 reappeared in Gmails "All folders" and were promptly
> downloaded to TB's All Folders (up to the limit size).
First. Please keep "one problem per a bug report at B.M.O", which is rule at B.M.O.
Second, re-citing comment #2.
Read meta Bug 402793 Comment #1 and read at least documents pointed in
Bug 402793 Comment #1, and read thru meta Bug 402793, and see bugs in
Dependency Tree for Bug 402793.
Third, what is Gmails "All folders"? User defined Gmail Label of ".../All folders/..." by you?
If string of "All folders" is involved in Drag&Drop'ed "A/B/C" folder, and if you added Gmail Label of ".../All folders/..." to about 10000 mails, it's not surprising, because X/Y/Z/.../All folders/... or .../All folders/... can become a new IMAP mail folder for Thunderbird after the problem due to length limitation of Gmail Label.
Updated•16 years ago
|
Summary: Folders get messed up when reorganizing them (Gmail IMAP) → Folders get messed up when reorganizing them (Gmail IMAP. Maximum Gmail Label length=40 bytes)
Comment 13•14 years ago
|
||
Cheech, does comment 12 or comment 11 help?
Whiteboard: [closeme 2011-07-07]
Comment 14•14 years ago
|
||
RESOLVED INCOMPLETE due to lack of response to last question. If you feel this change was made in error, please respond to this bug with your reasons why.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•